package xuegao.study.mall.rbac.service;

import org.springframework.transaction.annotation.Transactional;
import xuegao.study.mall.common.model.ums.UmsDepartment;
import xuegao.study.mall.common.vo.ums.UmsDepartmentVo;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface UmsDepartmentService {

    @Transactional
    int save(UmsDepartment department);

    @Transactional
    int deleteById(Long id);

    @Transactional
    int update(UmsDepartment department);

    /**
     * 查找所有
     * @return
     */
    List<UmsDepartment> findAll();
    /**
     * 查找所有-树形
     * @return
     */
    List<UmsDepartmentVo> listAll();
    /**
     * 数据导出
     * @param response response
     */
    void export(HttpServletResponse response) throws IOException;
    /**
     * 数据导入
     */
    @Transactional
    void importDep(List<UmsDepartment> depList);
}
